Skip to content

Refactor S3 credential handling in aws_utils #187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HeathHopkins
Copy link

Refactor S3 credential handling in aws_utils to allow S3 credentials from sources other than environment variables by using the AWS default credential chain.

Preserved credential checking before first use to prevent logs from filling up.

Also added aws-credential-types and tokio to dependencies in Cargo.toml and aws_utils/Cargo.toml

This PR preserves the same S3 client environment variable credential checks while allowing credential sources from IAM roles which is useful for local debugging (aws sso) and self-hosting on AWS (EC2 IAM role attachment).

The AWS S3 Rust SDK uses this default credential chain: env vars -> shared config/credentials (incl. SSO) -> web identity -> container creds -> EC2 IMDSv2. The new code checks the credential sources and bails with an error if none are found.

Closes #185


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

…m sources other than environment variables by using the AWS default credential chain.

Preserved credential checking before first use to prevent logs from filling up.

Also added `aws-credential-types` and `tokio` to dependencies in Cargo.toml and aws_utils/Cargo.toml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use fallback to default AWS credential provider
1 participant